package cena;

public class Ponto {

	private double x;
	private double y;
	private double z;
	private double w;

	public Ponto() {

		setX(0);
		setY(0);
		setZ(0);
		setW(1);
	}

	public Ponto(double x, double y) {

		setX(x);
		setY(y);
		setZ(0);
		setW(1);
	}

	public Ponto(double x, double y, double z) {

		setX(x);
		setY(y);
		setZ(z);
		setW(1);
	}

	public Ponto(double x, double y, double z, double w) {

		setX(x);
		setY(y);
		setZ(z);
		setW(w);
	}

	public void somarPonto(Ponto ponto) {

		setX(getX() + ponto.getX());
		setY(getY() + ponto.getY());
		setZ(getZ() + ponto.getZ());
	}

	public boolean verificarIguldadePontos(Ponto ponto) {
		return (this.getX() == ponto.getX()) && (this.getY() == ponto.getY())
				&& (this.getZ() == ponto.getZ())
				&& (this.getW() == ponto.getW());
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	public double getZ() {
		return z;
	}

	public void setZ(double z) {
		this.z = z;
	}

	public double getW() {
		return w;
	}

	public void setW(double w) {
		this.w = w;
	}

}
